/*
 * error_handling.h
 *
 *  Created on: Dec 12, 2010
 *      Author: cpy.prefers.you@gmail.com
 */

#ifndef ERROR_HANDLING_H_
#define ERROR_HANDLING_H_

#include <setjmp.h>
#include "symbol_table.h"

extern jmp_buf JumpBuffer;

extern int MatchType(Symbol_T *Symbol, int NumberOfType, ...);
extern void Error(int ErrorCode, ...);

enum ListOfErrors
{
    ERROR_UNKNOWN,
    ERROR_TYPE_MISMATCH,
    ERROR_NOT_ENOUGH_INPUT,
    ERROR_DO_NOT_OUTPUT,
    ERROR_HAS_NO_VALUE,
    ERROR_DONT_KNOW_HOW,
    ERROR_WHAT_TO_DO,
    ERROR_DEFINED,
    ERROR_UNEXPECTED,
    NUMBER_OF_ERRORS
};

#endif /* ERROR_HANDLING_H_ */
